package com.easylinkin.linkappapi.function.service;

import com.easylinkin.linkappapi.function.entity.LinkappFunctionRefDeviceType;
import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.function.entity.FunctionRefPrivilegeDTO;
import com.easylinkin.linkappapi.function.entity.LinkappFunction;
import com.easylinkin.linkappapi.security.entity.LinkappPrivilege;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author liuming
 * @since 2020-05-16
 */
public interface LinkappFunctionService extends IService<LinkappFunction> {

    boolean add(LinkappFunction function);

    boolean updateLinkappFunction(LinkappFunction function);

    boolean deleteBatch(List<LinkappFunction> function);
    
    boolean delete(LinkappFunction function);

    List<LinkappFunction> getLinkappFunctions(LinkappFunction function);
    
    IPage<LinkappFunction> getLinkappFunctionsPage(Page page, LinkappFunction function);

    LinkappFunction getLinkappFunction(LinkappFunction function);
    
	List<LinkappPrivilege> selectPrivilegeByFunction(String id);

	void function2Privileges(FunctionRefPrivilegeDTO functionRefPrivilegeDTO);
	
	void functions2Tenant(String tenantId,List<LinkappFunction> functions);

  LinkappFunctionRefDeviceType getRefDeviceType(String functionId);

  /**
   * 进行更新功能绑定产品类型
   * @param functionRefDeviceType
   * @return
   */
  Object saveOrUpdateDeviceType(LinkappFunctionRefDeviceType functionRefDeviceType);
}
